import 'package:json_annotation/json_annotation.dart';

import 'EcyGoodsHomeCategoryModel.dart';
part 'EcyGoodsHomeCategoryListModel.g.dart';

@JsonSerializable()
class EcyGoodsHomeCategoryListModel {
  int pages;
  int size;
  int total;
  List<EcyGoodsHomeCategoryModel> records;
  EcyGoodsHomeCategoryListModel(
      this.pages, this.size, this.total, this.records);

  // 从JSON创建User实例的工厂方法
  factory EcyGoodsHomeCategoryListModel.fromJson(Map<String, dynamic> json) =>
      _$EcyGoodsHomeCategoryListModelFromJson(json);

  // 将User实例转换为JSON的方法
  Map<String, dynamic> toJson() => _$EcyGoodsHomeCategoryListModelToJson(this);
}
